﻿<UserControl x:Class="HeritageAcademy.Window.WindowContent"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:local="clr-namespace:HeritageAcademy.Window" 
	xmlns:Controls="clr-namespace:HeritageAcademy.Library.Controls;assembly=HeritageAcademy.Library" 
	xmlns:Documentation="clr-namespace:HeritageAcademy.Documentation;assembly=HeritageAcademy.Documentation" 
    xmlns:Resources="clr-namespace:HeritageAcademy.Window.Resources.Localization"
	mc:Ignorable="d"
	x:Name="windowContent" 
	d:DesignHeight="800" d:DesignWidth="1000">

    <Grid x:Name="grid">
        
        <!-- Main content-->
    	<Grid x:Name="mainContent" Grid.Row="0" Width="Auto" Height="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0" Visibility="Visible" Opacity="1" d:IsHidden="True">
            
            <!-- Navigator -->
            <Controls:Navigator x:Name="Navigator" />
    		
            <!-- Logged user callout -->
            <Grid x:Name="grdLoggedUser" HorizontalAlignment="Right" Height="60" Margin="0,0,100,0" VerticalAlignment="Top" Cursor="Hand" Opacity="0" Visibility="Hidden">
                <Border Margin="0,0,0,8">
    	            <Border.Effect>
    		            <BlurEffect Radius="8" />
    	            </Border.Effect>
    	            <Controls:CalloutShape Fill="#6B000000"  ArrowHeight="10" ArrowWidth="17" RenderTransformOrigin="0,0" ArrowAlignment="Right" Margin="12.316,-0.645,-0.586,-1.516">
    		            <Controls:CalloutShape.RenderTransform>
    			            <TransformGroup>
    				            <ScaleTransform ScaleY="0.95" ScaleX="1.05"/>
    				            <SkewTransform AngleY="-3"/>
    				            <RotateTransform/>
    				            <TranslateTransform X="-8" Y="10"/>
    			            </TransformGroup>
    		            </Controls:CalloutShape.RenderTransform>
    	            </Controls:CalloutShape>
                </Border>
                <Controls:CalloutShape x:Name="csLoggedUserCallout" Fill="{DynamicResource LogoBackgroundBrush}" ArrowAlignment="Right" Margin="0,0,0,8" Cursor="Hand"/>
                <TextBlock x:Name="tbUserNick" HorizontalAlignment="Center" TextWrapping="Wrap" Text="Дмитрич" VerticalAlignment="Center" Foreground="White" Margin="20,0" FontSize="16" TextOptions.TextFormattingMode="Display" FontWeight="SemiBold"/>
            </Grid>
    	</Grid>
        
        <!-- Login content-->
        <Grid x:Name="loginContent" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="White">
        	<Grid.ColumnDefinitions>
        		<ColumnDefinition Width="0.329*"/>
        		<ColumnDefinition Width="0.671*"/>
        	</Grid.ColumnDefinitions>
        	<Grid.RowDefinitions>
        		<RowDefinition Height="0.33*"/>
        		<RowDefinition Height="0.33*"/>
        		<RowDefinition Height="0.33*"/>
        	</Grid.RowDefinitions>
			<Border x:Name="bdrBanner" BorderThickness="0" Margin="0" SnapsToDevicePixels="True" Grid.Row="1" Grid.ColumnSpan="2">
				<Border.Background>
					<SolidColorBrush Color="{DynamicResource SelectionColor}"/>
				</Border.Background>
			</Border>
        	<TextBlock x:Name="tbLogo" HorizontalAlignment="Center" TextWrapping="Wrap" Text="НАСЛЕДИЕ" VerticalAlignment="Center" FontSize="32" Foreground="White"/>
        	<Grid x:Name="grdQuotation" Margin="20,0,0,0" Grid.Column="1" Grid.Row="1">
        		<Grid.ColumnDefinitions>
        			<ColumnDefinition Width="0.105*"/>
        			<ColumnDefinition Width="0.781*"/>
        			<ColumnDefinition Width="0.114*"/>
        		</Grid.ColumnDefinitions>
        		<Grid.RowDefinitions>
        			<RowDefinition Height="40"/>
        			<RowDefinition/>
        			<RowDefinition Height="33.5"/>
        		</Grid.RowDefinitions>
        		<TextBlock TextWrapping="Wrap" Text="11 вещей, которым тебя забыли научить в школе" d:LayoutOverrides="Height" Grid.ColumnSpan="2" FontSize="24" Margin="10,0,0,0" Foreground="White" VerticalAlignment="Top" Grid.Column="1" HorizontalAlignment="Right"/>
        		<TextBlock TextWrapping="Wrap" Text="Билл Гейтс" VerticalAlignment="Top" Grid.Column="1" HorizontalAlignment="Right" Grid.Row="2" FontSize="16" Foreground="White"/>
        		<Controls:QuotesScroll x:Name="quotes" Margin="0" d:LayoutOverrides="Width, Height" Grid.Row="1" Grid.ColumnSpan="2" Foreground="White"/>
        	</Grid>
        	<Grid x:Name="grdUsers" Grid.Column="1" Margin="0" Grid.Row="2">
        		<Grid.RowDefinitions>
        			<RowDefinition/>
        			<RowDefinition Height="57"/>
        		</Grid.RowDefinitions>
        		<Border x:Name="bdrDelimeter" BorderThickness="0" Margin="30,0" Height="1" VerticalAlignment="Top" SnapsToDevicePixels="True" Grid.Row="1">
        			<Border.Background>
        				<SolidColorBrush Color="{DynamicResource SelectionColor}"/>
        			</Border.Background>
        		</Border>
        		<StackPanel x:Name="spBottomMenu" HorizontalAlignment="Right" Orientation="Horizontal" Grid.Row="2" VerticalAlignment="Center" d:LayoutOverrides="GridBox" Margin="0,0,30,0">
        			<Button x:Name="btnStartWellcome" Content="Освоиться" Style="{DynamicResource TextButton}" ToolTip="Хотите ознакомиться с возможностями?" Padding="0"/>
        			<TextBlock TextWrapping="Wrap" Text="|" VerticalAlignment="Center" Foreground="#FF616161" Margin="6,0" SnapsToDevicePixels="True" TextOptions.TextFormattingMode="Display"/>
        			<ToggleButton Visibility="Visible" x:Name="RegistrationButton" Style="{DynamicResource BottomTextToggleButton}" Padding="0" IsChecked="{Binding IsOpen, ElementName=Registration, Mode=TwoWay}" Margin="0" ToolTip="Вы тоже хотите зарегистрироваться?" Content="{x:Static Resources:Strings.Window_Registration}" VerticalContentAlignment="Bottom" SnapsToDevicePixels="True" />
        		</StackPanel>
        	</Grid>
        	<Border x:Name="bdrBgLogin" BorderThickness="1,0" SnapsToDevicePixels="True" HorizontalAlignment="Right" Width="260" Grid.RowSpan="3" Background="#5B9B9B9B">
        		<StackPanel x:Name="Users" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        	</Border>
			<Border x:Name="brdFade" BorderThickness="1" Background="#A4FFFFFF" Grid.RowSpan="3" Grid.ColumnSpan="2" Visibility="Collapsed"/>
			<Controls:Registration x:Name="Registration" HorizontalAlignment="Right" Width="60" Visibility="Collapsed" Grid.Row="2" Grid.Column="1" Height="60.135" VerticalAlignment="Bottom"/>
        	<Documentation:Welcome x:Name="WelcomeTour" Margin="0,-50,0,0" Visibility="Collapsed" Grid.RowSpan="3" Grid.ColumnSpan="2"/>
        </Grid>
        
        <!-- E/W/I message -->
		<Controls:ErrorMessage x:Name="Message" Margin="0,0,0,-44" VerticalAlignment="Bottom" d:LayoutOverrides="Height" RenderTransformOrigin="0.5,0.5" Opacity="0" HorizontalAlignment="Left">
			<Controls:ErrorMessage.RenderTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform/>
					<TranslateTransform/>
				</TransformGroup>
			</Controls:ErrorMessage.RenderTransform>
		</Controls:ErrorMessage>
    
    </Grid>
    
</UserControl>